package com.pray.common.constant;

/**
 * 商品系统的常量
 *
 * @author 魂悸魄
 * @date 2020/9/8 17:36
 */
public class ProductConstant {
    public enum AttrEnum {
        /**
         * 基本属性
         */
        ATTR_TYPE_BASE(1, "基本属性"),
        /**
         * 销售属性
         */
        ATTR_TYPE_SALE(0, "销售属性");

        private final int code;
        private final String msg;

        AttrEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

    public enum StatusEnum {
        /**
         * 商品状态 -> 新建
         */
        SPU_NEW(0, "新建"),
        /**
         * 商品状态 -> 上架
         */
        SPU_UP(1, "商品上架"),
        /**
         * 商品状态 -> 下架
         */
        SPU_DOWN(2, "商品下架");

        private final int code;
        private final String msg;

        StatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
}
